<template>
  <div class="test-root">
    {{num}}
    <van-button type="primary" @click="test">
      测试
    </van-button>
  </div>
</template>
<script setup lang="ts">
import {useUserStore} from "@/store/userStore";
import {storeToRefs} from "pinia";

const store=useUserStore()
let {num}=storeToRefs(store)
function test() {
  num.value++;
}
</script>
<script lang="ts">
export default {
  name: "index.vue"
}
</script>
<style lang="scss" scoped>
.test-root{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 24px;
}
</style>